package cn.kgc.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;

import java.io.Serializable;
import java.util.Date;

/**
 * @author wangyue
 * @version 1.0
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "depts")
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@SuppressWarnings("all")
public class Depts implements Serializable {

    /**
     * 部门id
     */
    @TableId(type = IdType.AUTO)
    private Long id;


    /**
     * 部门名称
     */
    @TableField(value = "dept_name")
    private String deptName;


    /**
     * 部门负责人ID
     */
    @TableField(value = "user_id")
    private Integer userId;


    /**
     * 部门负责人名称
     */
    @TableField(value = "user_name")
    private String userName;


    /**
     * 部门负责人邮箱
     */
    @TableField(value = "user_email")
    private String userEmail;


    /**
     * 创建时间
     */
    @TableField(value = "creationDate", fill = FieldFill.INSERT)
    @JsonIgnore
    private Date creationDate;


    /**
     * 修改时间
     */
    @TableField(value = "modifyDate", fill = FieldFill.UPDATE)
    @JsonIgnore
    private Date modifyDate;


    @Version
    @TableField(value = "version", fill = FieldFill.INSERT)
    private int version;


}
